<template>
  <div class="box">
    <bgBox>
      <sectionTitle title="重点活动"></sectionTitle>
      <div class="echartsContent">
        <!-- <otherPieEcharts/> -->
        <leftTable2 :showLength="5" :data="list" @cellClick="cellClick"/>
      </div>
    </bgBox>
  </div>
</template>

<script setup lang="ts">
import bgBox from '../components/bgBox.vue'
import sectionTitle from '../components/sectionTitle.vue'
import otherPieEcharts from '../components/otherPieEcharts.vue'
import leftTable2 from '../components/leftTable2.vue'
import { currentGET } from "@/api";
import { PopupType } from '../../index.d'
import { inject } from 'vue'
import { ref, reactive } from "vue";
const showPopup = inject('showPopup') as (data: PopupType) => void;
/**
 * 获取列表点击事件
 */
 const cellClick = (item: { [key: string]: any }) => {
    showPopup({ type: 31, show: true, popupFlag: 'activityView', searchInfo: item })
}
const list = ref([]);
const getData = () => {
  currentGET("activityList").then((res) => {
    console.log(res);
    if (res.success) {
      list.value = res.data.list;
    }
  });
};
getData();
</script>

<style scoped lang="less">
.box {
  height: 200px;
  .echartsContent {
    display: flex;
    flex-direction: row;
    height: 150px;
  }

}
</style>
